#include "head.h"
#define BUFFERSIZE 4096
void tx(char ch[], int size)
{
    int i=0,j=0;
    while(size/16!= (j-1)){
    printf("%07o",16*j);
    j++;
    putchar(' ');
    for(i=16*(j-1);i<16*j;i++)
    {
        if(ch[i]=='\n')
        {   i++;
            putchar(' ');
            printf("\\n");

        }
        if(ch[i]=='\0')
        break;
        putchar(' ');
        putchar(' ');
        printf("%c", ch[i]);
        putchar(' ');
    }
    printf("\n");
    printf("        ");
    for(i=16*(j-1);i<16*j;i++)
        {

            if(ch[i]=="\n")
            {   i++;
                printf("%3x ",'\n');
            }
            if(ch[i]=='\0')
            break;
            printf("%3x ",ch[i]);
        }
    printf("\n");
    }
    printf("%07o\n",i);
}

